import "@page/common/css/simpleheader.css";
import logo from "@assets/logo.png";

export default function SimpleHeader(props) {
    console.log(props);
    const params = $state.params;
    const { registerType, suppName, key } = params || {};

    /*从邮箱跳回来的判断*/
    //采购人注册邀请
    if (params.suppName) {
        params.registerType = 1;
    }

    //采购人或供应商注册
    if (params.key == "active") {
        params.registerType = 1;
    } else if (params.key == "actived") {
        params.registerType = 2;
    }

    return (
        <div className={"simp-header-wrapper"}>
            <div className={"simp-header"}>
                <img
                    onClick={() => {
                        $state.go({
                            stateName: "/"
                        });
                    }}
                    src={logo}
                    alt=""
                />
                <div className={"simp-header-txt"}>
                    <span />
                    {props.type == 1 && params.registerType == 1 && (
                        <p>采购人注册</p>
                    )}
                    {props.type == 1 && params.registerType == 2 && (
                        <p>供应商注册</p>
                    )}
                    {props.type == 2 && <p>找回密码</p>}
                    {props.type == 3 && <p>找回签名密码</p>}
                </div>
            </div>
            <div className={"simp-header-line"} />
        </div>
    );
}
